import type {Model} from "../../../framework/model/Model.ts";

//-----------Start 资源管理----------------------------
const globalResources = new Map<string, any>();

const initResources = (handler: ()=>void) => {
    handler()
}

export const getResource = (name: string): any => {
    return globalResources.get(name)
}

export const addResource = (name: string, res: any) => {
    if (globalResources.has(name)) {
        return
    }
    globalResources.set(name, res)
}
//-----------End 资源管理------------------------------

// ---------------Start 3D模型部分----------------------------------------
export const modelList: Model[] = []

export const registerModel = (m: Model) => {
    modelList.push(m)
}
// ----------------End 3D模型部分---------------------------------------

const startLogic = () => {

}

const process = () => {
    initResources()
    startLogic()
}